package com.fcat.gateway;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.web.client.RestTemplate;


@SpringBootApplication(scanBasePackages = {"com.fcat.gateway","com.fcat.springboot.redis"})
@EnableDiscoveryClient
@EnableScheduling
public class GatewayBootstrap {


	public static void main(String[] args) {
		SpringApplication.run(GatewayBootstrap.class, args);
	}

	@Bean
	@LoadBalanced
	RestTemplate restTemplate() {
		return new RestTemplate();
	}

	@Bean("myTemplate")
	RestTemplate restTemplate2() {
		return new RestTemplate();
	}


}
